﻿// See https://aka.ms/new-console-template for more information
using QskjDownloadVideoAddWatermark.Service;
using QskjLibrary;

Console.WriteLine("Hello, World!");

#region 下载录像水印处理
ParameterizedThreadStart threadStart2 = new((obj) =>
{
    Console.WriteLine(DateTime.Now + "____录像水印处理执行开始");
    DownloadUpdate.GetVideoDataWatermark();//下载录像信息&&FTP文件下载
    while (true)
    {
        Thread.Sleep(5000);
        DownloadUpdate.GetVideoDataWatermark();//下载录像信息
        {
            try
            {
                //服务健康检测数据
                string sql = $@"update qskj.S_SysRequest116Ft set createtime=now() where typenum=3;";
                MySqlHelper.ExecuteNonQuery(System.Data.CommandType.Text, sql);
            }
            catch (Exception e)
            {
                Console.WriteLine("服务健康检测数据写入异常" + e.Message);
            }
        }
    }
});
Thread thread2 = new Thread(threadStart2);
thread2.Start();
#endregion
while (true)
{
    Thread.Sleep(1000 * 60);
}